<template>
  <div class="SourceList">
    <div class="list_wrap" v-for="(i, index) in dataList" :key="index">
      <p class="f16 font-m">数据库名称：
        <span class="font-r" v-html="i.title"></span>
      </p>
      <p class="f16 font-m" style="display:flex">
		  <p style="min-width:45px">描述：</p>
        <span class="font-r" v-html="i.content"></span>
      </p>
      <p class="f16 font-m">链接: <a class="font-r link" :href="i.link1">{{ i.text1 }}</a></p>
    </div>
    <div class="list_Pagination">
       <Pagination :total="total" :count="3" @change="pageChange"/>
    </div>
  </div>
</template>
<script>
import { getArticleLists } from '@/api/sections'
export default {
    props:['cid'],
	
	data() {
	    return {
			page:1,
			total:0,
			tabsAct:0,
			dataList:[],
			yearList:[],
			navList:[]
	    }
	},
	watch:{
		cid(val){
			this.initData()
		}
	},
	created(){
			this.initData()},
	methods:{
		pageChange(e) {
			this.page = e
			this.getData()
		},
		initData() {
			this.page=1
			this.dataList=[]
			this.total=0
			this.getData()
		},
		getData() {
			let post = {
				page: this.page,
				ext:'content,text1,link1',
				// mid:17,
				limit: 10
			}
			if(this.cid){
				post.cid=this.cid
			}else{
				post.cid=1438
			}
			getArticleLists(post).then((res) => {
				console.log(res, 1111)
				this.dataList = res.data.data
				this.total = res.data.total
			})
		},
	}
}
</script>